@import "mixin_helpers";

.fc {
  direction: ltr;
  text-align: left;
  table {
    border-collapse: collapse;
    border-spacing: 0;
  }
}

html .fc {
  font-size: 1em;
}

.fc {
  table {
    font-size: 1em;
  }
  td, th {
    padding: 0;
    vertical-align: top;
  }
}

.fc-header {
  position: relative;
  td {
    white-space: nowrap;
  }
}

.fc-header-left {
  text-align: left;
  width: 100%;
}

.fc-header-center {
  text-align: center;
  position: absolute;
  top: 0;
  width: 80%;
  left: 10%;
  line-height: $header-height;
}

.fc-button-inner {
  border-left: 1px solid #d5d5d5;
}

.fc-header-left .fc-button-inner {
  border: none;
}

.fc-header-right {
  text-align: right;
  position: absolute;
  top: -$header-height;
  right: 0;
  .fc-button-agendaDay .fc-button-inner {
    @include border-top-right-radius(3px);
  }
}

.fc-header-title {
  display: inline-block;
  vertical-align: top;
  h2 {
    font-size: 12px;
    margin: 0;
  }
  strong {
    margin-top: 0;
    white-space: nowrap;
    padding: 8px 12px!important;
    display: block;
  }
}

.fc .fc-header-space {
  padding-left: 10px;
}

.fc-header {
  .fc-corner-right {
    margin-right: 0;
    float: right;
  }
  .ui-corner-right {
    margin-right: 0;
  }
  .fc-state-hover, .ui-state-hover {
    z-index: 2;
  }
  .fc-state-down {
    z-index: 3;
  }
  .fc-state-active, .ui-state-active {
    z-index: 4;
  }
}

.fc-button-next {
  float: right;
  margin-right: -2px;
}

.fc-view {
  width: 100%;
  overflow: hidden;
}

.fc-border-separate thead {
  @include std-bg($header-gradient-top, $header-gradient-bottom);
  height: 25px;
  line-height: 25px;
}

.fc-widget-header, .fc-widget-content {
  border: 1px solid #ccc;
}

.fc-state-highlight {
  background: #f4f3e6;
}

.fc-cell-overlay {
  background: #99CCFF;
  opacity: .2;
}

.fc-button {
  position: relative;
  cursor: pointer;
}

.fc-button-inner {
  position: relative;
  float: left;
  overflow: hidden;
}

.fc-button-content {
  position: relative;
  float: left;
  height: $header-height;
  line-height: $header-height;
  padding: 0 14px;
  white-space: nowrap;
}

.fc-header-left .fc-button-content {
  padding: 0 8px;
}

.fc-header-right .fc-button-content {
  height: $header-height;
}

/* gloss effect */

.fc-state-default .fc-button-effect {
  position: absolute;
  top: 50%;
  left: 0;
}

.fc-state-active {
  color: #797979;
  background: #f9f9f9;
  box-shadow: 0 -1px 0 #eaeaea inset;
  .fc-button-inner {
    color: #797979;
    background: #f9f9f9;
    box-shadow: 0 -1px 0 #eaeaea inset;
  }
}

.fc-first th {
  padding-top: 1px;
}

.fc-state-disabled {
  color: #999;
  border-color: #ddd;
  .fc-button-inner {
    color: #999;
    border-color: #ddd;
  }
  cursor: default;
  .fc-button-effect {
    display: none;
  }
}

/* Global Event Styles */

.fc-event {
  border-style: solid;
  border-width: 0;
  font-size: .85em;
  cursor: default;
}

a.fc-event, .fc-event-draggable {
  cursor: pointer;
}

a.fc-event {
  text-decoration: none;
}

.fc-rtl .fc-event {
  text-align: right;
}

.fc-event-skin {
  border-color: #32779A;
  background-color: #729BB9;
  color: #fff;
  display: block;
  padding: 1px 0px;
  font-size: 11px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  -khtml-border-radius: 2px;
  border-radius: 2px;
  margin-top: 1px;
}

.fc-event-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-style: solid;
  border-width: 0;
  overflow: hidden;
}

.fc-event-time, .fc-event-title {
  padding: 0 2px 1px 5px;
  display: block;
  float: left;
  line-height: 16px;
}

.fc .ui-resizable-handle {
  display: block;
  position: absolute;
  z-index: 99999;
  overflow: hidden;
  font-size: 300%;
  line-height: 50%;
}

/* Horizontal Events */

.fc-event-hori {
  margin-bottom: 1px;
  .ui-resizable-e {
    top: 0 !important;
    right: -3px !important;
    width: 7px !important;
    height: 100% !important;
    cursor: e-resize;
  }
  .ui-resizable-w {
    top: 0 !important;
    left: -3px !important;
    width: 7px !important;
    height: 100% !important;
    cursor: w-resize;
  }
}

.fc-corner-right {
  margin-right: 1px;
  .fc-button-inner, .fc-event-inner {
    margin-right: 0;
  }
}

.fc-corner-top {
  margin-top: 1px;
  .fc-event-inner {
    margin-top: -1px;
  }
}

.fc-corner-bottom {
  margin-bottom: 1px;
  .fc-event-inner {
    margin-bottom: -1px;
  }
}

.fc-corner-top .fc-event-inner {
  border-top-width: 1px;
}

.fc-corner-bottom .fc-event-inner {
  border-bottom-width: 1px;
}

table.fc-border-separate {
  border-collapse: separate;
}

.fc-border-separate {
  th {
    border-width: 1px 0 0 1px;
  }
  td {
    border-width: 1px 0 0 1px;
    &:first-child {
      border-left: none;
    }
  }
  th:first-child {
    border-left: none;
  }
  tr.fc-last {
    th, td {
      border-top-width: 1px;
    }
  }
  tbody tr.fc-first {
    td, th {
      border-top-width: 1px;
    }
  }
}

/* Month View, Basic Week View, Basic Day View */

.fc-widget-header {
  text-align: center;
}

.fc-day-number {
  float: right;
  padding: 6px 5px 2px 5px;
}

.fc-cols .fc-other-month .fc-day-number {
  opacity: 0.3;
  filter: alpha(opacity = 30);
}

.fc-day-content {
  clear: both;
  padding: 5px 2px 3px;
}

/* event styles */

.fc-cols .fc-event-time {
  font-weight: bold;
}

/* right-to-left */

.fc-rtl .fc-cols {
  .fc-day-number {
    float: left;
  }
  .fc-event-time {
    float: right;
  }
}

/* Agenda Week View, Agenda Day View */

.fc-agenda table {
  border-collapse: separate;
}

.fc-agenda-days th {
  text-align: center;
}

.fc-agenda {
  .fc-agenda-axis {
    width: 50px;
    padding: 0 4px;
    vertical-align: middle;
    text-align: right;
    white-space: nowrap;
    font-weight: normal;
  }
  .fc-day-content {
    padding: 2px 2px 1px;
  }
}

.fc-agenda-days {
  .fc-agenda-axis {
    border-right-width: 1px;
  }
  .fc-col0 {
    border-left-width: 0;
  }
}

.fc-agenda-allday {
  th {
    border-width: 0 1px;
  }
  .fc-day-content {
    min-height: 34px;
    _height: 34px;
  }
}

.fc-agenda-divider-inner {
  height: 2px;
  overflow: hidden;
}

.fc-widget-header .fc-agenda-divider-inner {
  background: #eee;
}

/* slot rows */

.fc-agenda-slots {
  th {
    border-width: 1px 1px 0;
  }
  td {
    border-width: 1px 0 0;
    background: none;
    div {
      height: 20px;
    }
  }
  tr {
    &.fc-slot0 {
      th, td {
        border-top-width: 0;
      }
    }
    &.fc-minor {
      th, td {
        border-top-style: dotted;
      }
      th.ui-widget-header {
        *border-top-style: solid;
      }
    }
  }
}

/* Vertical Events */

.fc-event-vert {
  border-width: 0 1px;
  .fc-event-head, .fc-event-content {
    position: relative;
    z-index: 2;
    width: 100%;
    overflow: hidden;
  }
  .fc-event-time {
    white-space: nowrap;
    font-size: 10px;
  }
  .fc-event-bg {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: .3;
    filter: alpha(opacity = 30);
  }
}

.fc .ui-draggable-dragging .fc-event-bg, .fc-select-helper .fc-event-bg {
  display: none;
}

.fc-event-vert .ui-resizable-s {
  bottom: 0        !important;
  width: 100%      !important;
  height: 8px      !important;
  overflow: hidden !important;
  line-height: 8px !important;
  font-size: 11px  !important;
  font-family: monospace;
  text-align: center;
  cursor: s-resize;
}

.fc-agenda .ui-resizable-resizing {
  overflow: hidden;
}